package com.dly.blog.exception;

import com.dly.blog.content.ExceptionContent;
import lombok.Getter;

@Getter
public enum ContentExceptionEnum {

    NO_PERMISSIONS_EDIT_OTHER_CONTENT(new ContentException(ExceptionContent.ContentException+1, "不能修改其他人的文章"));

    ContentExceptionEnum(ContentException contentException){
        this.contentException = contentException;
    }

    private final ContentExceptionEnum.ContentException contentException;

    public static class ContentException extends GlobalException{

        private static final String MODULE = "Content";

        public ContentException(int code, String message) {
            super(code, message, MODULE);
        }
    }
}
